<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    div {
      width: 300px;
      height: 200px;
      background-color: yellow;
    }
  </style>
</head>

<body>
  <input type="button" value="点击吧" id="btn">
  <div>

  </div>
</body>
<script>
  let btn = document.getElementById("btn");
  btn.addEventListener("click", (e) => {
    document.querySelector("div").style.display = "none";
  });
</script>

</html>